Left Termination of the query pattern perm_in_2(g, a) w.r.t. the given Prolog program could successfully be proven:



Prolog
  ↳ PrologToPiTRSProof

Clauses:

append2(parts([], Y), is(sum(Y))).
append2(parts(.(H, X), Y), is(sum(.(H, Z)))) :- append2(parts(X, Y), is(sum(Z))).
append1(parts([], Y), is(sum(Y))).
append1(parts(.(H, X), Y), is(sum(.(H, Z)))) :- append1(parts(X, Y), is(sum(Z))).
perm([], []).
perm(L, .(H, T)) :- ','(append2(parts(V, .(H, U)), is(sum(L))), ','(append1(parts(V, U), is(sum(W))), perm(W, T))).

Queries:

perm(g,a).

We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

perm_in(L, .(H, T)) → U3(L, H, T, append2_in(parts(V, .(H, U)), is(sum(L))))
append2_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1(H, X, Y, Z, append2_in(parts(X, Y), is(sum(Z))))
append2_in(parts([], Y), is(sum(Y))) → append2_out(parts([], Y), is(sum(Y)))
U1(H, X, Y, Z, append2_out(parts(X, Y), is(sum(Z)))) → append2_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U3(L, H, T, append2_out(parts(V, .(H, U)), is(sum(L)))) → U4(L, H, T, V, U, append1_in(parts(V, U), is(sum(W))))
append1_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2(H, X, Y, Z, append1_in(parts(X, Y), is(sum(Z))))
append1_in(parts([], Y), is(sum(Y))) → append1_out(parts([], Y), is(sum(Y)))
U2(H, X, Y, Z, append1_out(parts(X, Y), is(sum(Z)))) → append1_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U4(L, H, T, V, U, append1_out(parts(V, U), is(sum(W)))) → U5(L, H, T, perm_in(W, T))
perm_in([], []) → perm_out([], [])
U5(L, H, T, perm_out(W, T)) → perm_out(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in(x1, x2)  =  perm_in(x1)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x4)
append2_in(x1, x2)  =  append2_in(x2)
parts(x1, x2)  =  parts(x1, x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
U1(x1, x2, x3, x4, x5)  =  U1(x1, x5)
[]  =  []
append2_out(x1, x2)  =  append2_out(x1)
U4(x1, x2, x3, x4, x5, x6)  =  U4(x2, x6)
append1_in(x1, x2)  =  append1_in(x1)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x5)
append1_out(x1, x2)  =  append1_out(x2)
U5(x1, x2, x3, x4)  =  U5(x2, x4)
perm_out(x1, x2)  =  perm_out(x2)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

perm_in(L, .(H, T)) → U3(L, H, T, append2_in(parts(V, .(H, U)), is(sum(L))))
append2_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1(H, X, Y, Z, append2_in(parts(X, Y), is(sum(Z))))
append2_in(parts([], Y), is(sum(Y))) → append2_out(parts([], Y), is(sum(Y)))
U1(H, X, Y, Z, append2_out(parts(X, Y), is(sum(Z)))) → append2_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U3(L, H, T, append2_out(parts(V, .(H, U)), is(sum(L)))) → U4(L, H, T, V, U, append1_in(parts(V, U), is(sum(W))))
append1_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2(H, X, Y, Z, append1_in(parts(X, Y), is(sum(Z))))
append1_in(parts([], Y), is(sum(Y))) → append1_out(parts([], Y), is(sum(Y)))
U2(H, X, Y, Z, append1_out(parts(X, Y), is(sum(Z)))) → append1_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U4(L, H, T, V, U, append1_out(parts(V, U), is(sum(W)))) → U5(L, H, T, perm_in(W, T))
perm_in([], []) → perm_out([], [])
U5(L, H, T, perm_out(W, T)) → perm_out(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in(x1, x2)  =  perm_in(x1)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x4)
append2_in(x1, x2)  =  append2_in(x2)
parts(x1, x2)  =  parts(x1, x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
U1(x1, x2, x3, x4, x5)  =  U1(x1, x5)
[]  =  []
append2_out(x1, x2)  =  append2_out(x1)
U4(x1, x2, x3, x4, x5, x6)  =  U4(x2, x6)
append1_in(x1, x2)  =  append1_in(x1)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x5)
append1_out(x1, x2)  =  append1_out(x2)
U5(x1, x2, x3, x4)  =  U5(x2, x4)
perm_out(x1, x2)  =  perm_out(x2)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

PERM_IN(L, .(H, T)) → U31(L, H, T, append2_in(parts(V, .(H, U)), is(sum(L))))
PERM_IN(L, .(H, T)) → APPEND2_IN(parts(V, .(H, U)), is(sum(L)))
APPEND2_IN(parts(.(H, X), Y), is(sum(.(H, Z)))) → U11(H, X, Y, Z, append2_in(parts(X, Y), is(sum(Z))))
APPEND2_IN(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN(parts(X, Y), is(sum(Z)))
U31(L, H, T, append2_out(parts(V, .(H, U)), is(sum(L)))) → U41(L, H, T, V, U, append1_in(parts(V, U), is(sum(W))))
U31(L, H, T, append2_out(parts(V, .(H, U)), is(sum(L)))) → APPEND1_IN(parts(V, U), is(sum(W)))
APPEND1_IN(parts(.(H, X), Y), is(sum(.(H, Z)))) → U21(H, X, Y, Z, append1_in(parts(X, Y), is(sum(Z))))
APPEND1_IN(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN(parts(X, Y), is(sum(Z)))
U41(L, H, T, V, U, append1_out(parts(V, U), is(sum(W)))) → U51(L, H, T, perm_in(W, T))
U41(L, H, T, V, U, append1_out(parts(V, U), is(sum(W)))) → PERM_IN(W, T)

The TRS R consists of the following rules:

perm_in(L, .(H, T)) → U3(L, H, T, append2_in(parts(V, .(H, U)), is(sum(L))))
append2_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1(H, X, Y, Z, append2_in(parts(X, Y), is(sum(Z))))
append2_in(parts([], Y), is(sum(Y))) → append2_out(parts([], Y), is(sum(Y)))
U1(H, X, Y, Z, append2_out(parts(X, Y), is(sum(Z)))) → append2_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U3(L, H, T, append2_out(parts(V, .(H, U)), is(sum(L)))) → U4(L, H, T, V, U, append1_in(parts(V, U), is(sum(W))))
append1_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2(H, X, Y, Z, append1_in(parts(X, Y), is(sum(Z))))
append1_in(parts([], Y), is(sum(Y))) → append1_out(parts([], Y), is(sum(Y)))
U2(H, X, Y, Z, append1_out(parts(X, Y), is(sum(Z)))) → append1_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U4(L, H, T, V, U, append1_out(parts(V, U), is(sum(W)))) → U5(L, H, T, perm_in(W, T))
perm_in([], []) → perm_out([], [])
U5(L, H, T, perm_out(W, T)) → perm_out(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in(x1, x2)  =  perm_in(x1)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x4)
append2_in(x1, x2)  =  append2_in(x2)
parts(x1, x2)  =  parts(x1, x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
U1(x1, x2, x3, x4, x5)  =  U1(x1, x5)
[]  =  []
append2_out(x1, x2)  =  append2_out(x1)
U4(x1, x2, x3, x4, x5, x6)  =  U4(x2, x6)
append1_in(x1, x2)  =  append1_in(x1)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x5)
append1_out(x1, x2)  =  append1_out(x2)
U5(x1, x2, x3, x4)  =  U5(x2, x4)
perm_out(x1, x2)  =  perm_out(x2)
U51(x1, x2, x3, x4)  =  U51(x2, x4)
APPEND1_IN(x1, x2)  =  APPEND1_IN(x1)
U31(x1, x2, x3, x4)  =  U31(x4)
U41(x1, x2, x3, x4, x5, x6)  =  U41(x2, x6)
PERM_IN(x1, x2)  =  PERM_IN(x1)
U21(x1, x2, x3, x4, x5)  =  U21(x1, x5)
U11(x1, x2, x3, x4, x5)  =  U11(x1, x5)
APPEND2_IN(x1, x2)  =  APPEND2_IN(x2)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

PERM_IN(L, .(H, T)) → U31(L, H, T, append2_in(parts(V, .(H, U)), is(sum(L))))
PERM_IN(L, .(H, T)) → APPEND2_IN(parts(V, .(H, U)), is(sum(L)))
APPEND2_IN(parts(.(H, X), Y), is(sum(.(H, Z)))) → U11(H, X, Y, Z, append2_in(parts(X, Y), is(sum(Z))))
APPEND2_IN(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN(parts(X, Y), is(sum(Z)))
U31(L, H, T, append2_out(parts(V, .(H, U)), is(sum(L)))) → U41(L, H, T, V, U, append1_in(parts(V, U), is(sum(W))))
U31(L, H, T, append2_out(parts(V, .(H, U)), is(sum(L)))) → APPEND1_IN(parts(V, U), is(sum(W)))
APPEND1_IN(parts(.(H, X), Y), is(sum(.(H, Z)))) → U21(H, X, Y, Z, append1_in(parts(X, Y), is(sum(Z))))
APPEND1_IN(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN(parts(X, Y), is(sum(Z)))
U41(L, H, T, V, U, append1_out(parts(V, U), is(sum(W)))) → U51(L, H, T, perm_in(W, T))
U41(L, H, T, V, U, append1_out(parts(V, U), is(sum(W)))) → PERM_IN(W, T)

The TRS R consists of the following rules:

perm_in(L, .(H, T)) → U3(L, H, T, append2_in(parts(V, .(H, U)), is(sum(L))))
append2_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1(H, X, Y, Z, append2_in(parts(X, Y), is(sum(Z))))
append2_in(parts([], Y), is(sum(Y))) → append2_out(parts([], Y), is(sum(Y)))
U1(H, X, Y, Z, append2_out(parts(X, Y), is(sum(Z)))) → append2_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U3(L, H, T, append2_out(parts(V, .(H, U)), is(sum(L)))) → U4(L, H, T, V, U, append1_in(parts(V, U), is(sum(W))))
append1_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2(H, X, Y, Z, append1_in(parts(X, Y), is(sum(Z))))
append1_in(parts([], Y), is(sum(Y))) → append1_out(parts([], Y), is(sum(Y)))
U2(H, X, Y, Z, append1_out(parts(X, Y), is(sum(Z)))) → append1_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U4(L, H, T, V, U, append1_out(parts(V, U), is(sum(W)))) → U5(L, H, T, perm_in(W, T))
perm_in([], []) → perm_out([], [])
U5(L, H, T, perm_out(W, T)) → perm_out(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in(x1, x2)  =  perm_in(x1)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x4)
append2_in(x1, x2)  =  append2_in(x2)
parts(x1, x2)  =  parts(x1, x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
U1(x1, x2, x3, x4, x5)  =  U1(x1, x5)
[]  =  []
append2_out(x1, x2)  =  append2_out(x1)
U4(x1, x2, x3, x4, x5, x6)  =  U4(x2, x6)
append1_in(x1, x2)  =  append1_in(x1)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x5)
append1_out(x1, x2)  =  append1_out(x2)
U5(x1, x2, x3, x4)  =  U5(x2, x4)
perm_out(x1, x2)  =  perm_out(x2)
U51(x1, x2, x3, x4)  =  U51(x2, x4)
APPEND1_IN(x1, x2)  =  APPEND1_IN(x1)
U31(x1, x2, x3, x4)  =  U31(x4)
U41(x1, x2, x3, x4, x5, x6)  =  U41(x2, x6)
PERM_IN(x1, x2)  =  PERM_IN(x1)
U21(x1, x2, x3, x4, x5)  =  U21(x1, x5)
U11(x1, x2, x3, x4, x5)  =  U11(x1, x5)
APPEND2_IN(x1, x2)  =  APPEND2_IN(x2)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 5 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND1_IN(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN(parts(X, Y), is(sum(Z)))

The TRS R consists of the following rules:

perm_in(L, .(H, T)) → U3(L, H, T, append2_in(parts(V, .(H, U)), is(sum(L))))
append2_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1(H, X, Y, Z, append2_in(parts(X, Y), is(sum(Z))))
append2_in(parts([], Y), is(sum(Y))) → append2_out(parts([], Y), is(sum(Y)))
U1(H, X, Y, Z, append2_out(parts(X, Y), is(sum(Z)))) → append2_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U3(L, H, T, append2_out(parts(V, .(H, U)), is(sum(L)))) → U4(L, H, T, V, U, append1_in(parts(V, U), is(sum(W))))
append1_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2(H, X, Y, Z, append1_in(parts(X, Y), is(sum(Z))))
append1_in(parts([], Y), is(sum(Y))) → append1_out(parts([], Y), is(sum(Y)))
U2(H, X, Y, Z, append1_out(parts(X, Y), is(sum(Z)))) → append1_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U4(L, H, T, V, U, append1_out(parts(V, U), is(sum(W)))) → U5(L, H, T, perm_in(W, T))
perm_in([], []) → perm_out([], [])
U5(L, H, T, perm_out(W, T)) → perm_out(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in(x1, x2)  =  perm_in(x1)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x4)
append2_in(x1, x2)  =  append2_in(x2)
parts(x1, x2)  =  parts(x1, x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
U1(x1, x2, x3, x4, x5)  =  U1(x1, x5)
[]  =  []
append2_out(x1, x2)  =  append2_out(x1)
U4(x1, x2, x3, x4, x5, x6)  =  U4(x2, x6)
append1_in(x1, x2)  =  append1_in(x1)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x5)
append1_out(x1, x2)  =  append1_out(x2)
U5(x1, x2, x3, x4)  =  U5(x2, x4)
perm_out(x1, x2)  =  perm_out(x2)
APPEND1_IN(x1, x2)  =  APPEND1_IN(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND1_IN(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN(parts(X, Y), is(sum(Z)))

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
parts(x1, x2)  =  parts(x1, x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
APPEND1_IN(x1, x2)  =  APPEND1_IN(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ UsableRulesReductionPairsProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APPEND1_IN(parts(.(H, X), Y)) → APPEND1_IN(parts(X, Y))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

APPEND1_IN(parts(.(H, X), Y)) → APPEND1_IN(parts(X, Y))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [25]:

POL(.(x1, x2)) = x1 + 2·x2   
POL(APPEND1_IN(x1)) = 2·x1   
POL(parts(x1, x2)) = 2·x1 + x2   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ PisEmptyProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND2_IN(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN(parts(X, Y), is(sum(Z)))

The TRS R consists of the following rules:

perm_in(L, .(H, T)) → U3(L, H, T, append2_in(parts(V, .(H, U)), is(sum(L))))
append2_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1(H, X, Y, Z, append2_in(parts(X, Y), is(sum(Z))))
append2_in(parts([], Y), is(sum(Y))) → append2_out(parts([], Y), is(sum(Y)))
U1(H, X, Y, Z, append2_out(parts(X, Y), is(sum(Z)))) → append2_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U3(L, H, T, append2_out(parts(V, .(H, U)), is(sum(L)))) → U4(L, H, T, V, U, append1_in(parts(V, U), is(sum(W))))
append1_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2(H, X, Y, Z, append1_in(parts(X, Y), is(sum(Z))))
append1_in(parts([], Y), is(sum(Y))) → append1_out(parts([], Y), is(sum(Y)))
U2(H, X, Y, Z, append1_out(parts(X, Y), is(sum(Z)))) → append1_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U4(L, H, T, V, U, append1_out(parts(V, U), is(sum(W)))) → U5(L, H, T, perm_in(W, T))
perm_in([], []) → perm_out([], [])
U5(L, H, T, perm_out(W, T)) → perm_out(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in(x1, x2)  =  perm_in(x1)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x4)
append2_in(x1, x2)  =  append2_in(x2)
parts(x1, x2)  =  parts(x1, x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
U1(x1, x2, x3, x4, x5)  =  U1(x1, x5)
[]  =  []
append2_out(x1, x2)  =  append2_out(x1)
U4(x1, x2, x3, x4, x5, x6)  =  U4(x2, x6)
append1_in(x1, x2)  =  append1_in(x1)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x5)
append1_out(x1, x2)  =  append1_out(x2)
U5(x1, x2, x3, x4)  =  U5(x2, x4)
perm_out(x1, x2)  =  perm_out(x2)
APPEND2_IN(x1, x2)  =  APPEND2_IN(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND2_IN(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN(parts(X, Y), is(sum(Z)))

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
parts(x1, x2)  =  parts(x1, x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
APPEND2_IN(x1, x2)  =  APPEND2_IN(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ UsableRulesReductionPairsProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APPEND2_IN(is(sum(.(H, Z)))) → APPEND2_IN(is(sum(Z)))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

APPEND2_IN(is(sum(.(H, Z)))) → APPEND2_IN(is(sum(Z)))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [25]:

POL(.(x1, x2)) = x1 + 2·x2   
POL(APPEND2_IN(x1)) = 2·x1   
POL(is(x1)) = 2·x1   
POL(sum(x1)) = 2·x1   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ PisEmptyProof
              ↳ PiDP

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

PERM_IN(L, .(H, T)) → U31(L, H, T, append2_in(parts(V, .(H, U)), is(sum(L))))
U41(L, H, T, V, U, append1_out(parts(V, U), is(sum(W)))) → PERM_IN(W, T)
U31(L, H, T, append2_out(parts(V, .(H, U)), is(sum(L)))) → U41(L, H, T, V, U, append1_in(parts(V, U), is(sum(W))))

The TRS R consists of the following rules:

perm_in(L, .(H, T)) → U3(L, H, T, append2_in(parts(V, .(H, U)), is(sum(L))))
append2_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1(H, X, Y, Z, append2_in(parts(X, Y), is(sum(Z))))
append2_in(parts([], Y), is(sum(Y))) → append2_out(parts([], Y), is(sum(Y)))
U1(H, X, Y, Z, append2_out(parts(X, Y), is(sum(Z)))) → append2_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U3(L, H, T, append2_out(parts(V, .(H, U)), is(sum(L)))) → U4(L, H, T, V, U, append1_in(parts(V, U), is(sum(W))))
append1_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2(H, X, Y, Z, append1_in(parts(X, Y), is(sum(Z))))
append1_in(parts([], Y), is(sum(Y))) → append1_out(parts([], Y), is(sum(Y)))
U2(H, X, Y, Z, append1_out(parts(X, Y), is(sum(Z)))) → append1_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U4(L, H, T, V, U, append1_out(parts(V, U), is(sum(W)))) → U5(L, H, T, perm_in(W, T))
perm_in([], []) → perm_out([], [])
U5(L, H, T, perm_out(W, T)) → perm_out(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in(x1, x2)  =  perm_in(x1)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x4)
append2_in(x1, x2)  =  append2_in(x2)
parts(x1, x2)  =  parts(x1, x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
U1(x1, x2, x3, x4, x5)  =  U1(x1, x5)
[]  =  []
append2_out(x1, x2)  =  append2_out(x1)
U4(x1, x2, x3, x4, x5, x6)  =  U4(x2, x6)
append1_in(x1, x2)  =  append1_in(x1)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x5)
append1_out(x1, x2)  =  append1_out(x2)
U5(x1, x2, x3, x4)  =  U5(x2, x4)
perm_out(x1, x2)  =  perm_out(x2)
U31(x1, x2, x3, x4)  =  U31(x4)
U41(x1, x2, x3, x4, x5, x6)  =  U41(x2, x6)
PERM_IN(x1, x2)  =  PERM_IN(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

PERM_IN(L, .(H, T)) → U31(L, H, T, append2_in(parts(V, .(H, U)), is(sum(L))))
U41(L, H, T, V, U, append1_out(parts(V, U), is(sum(W)))) → PERM_IN(W, T)
U31(L, H, T, append2_out(parts(V, .(H, U)), is(sum(L)))) → U41(L, H, T, V, U, append1_in(parts(V, U), is(sum(W))))

The TRS R consists of the following rules:

append2_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1(H, X, Y, Z, append2_in(parts(X, Y), is(sum(Z))))
append2_in(parts([], Y), is(sum(Y))) → append2_out(parts([], Y), is(sum(Y)))
append1_in(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2(H, X, Y, Z, append1_in(parts(X, Y), is(sum(Z))))
append1_in(parts([], Y), is(sum(Y))) → append1_out(parts([], Y), is(sum(Y)))
U1(H, X, Y, Z, append2_out(parts(X, Y), is(sum(Z)))) → append2_out(parts(.(H, X), Y), is(sum(.(H, Z))))
U2(H, X, Y, Z, append1_out(parts(X, Y), is(sum(Z)))) → append1_out(parts(.(H, X), Y), is(sum(.(H, Z))))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
append2_in(x1, x2)  =  append2_in(x2)
parts(x1, x2)  =  parts(x1, x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
U1(x1, x2, x3, x4, x5)  =  U1(x1, x5)
[]  =  []
append2_out(x1, x2)  =  append2_out(x1)
append1_in(x1, x2)  =  append1_in(x1)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x5)
append1_out(x1, x2)  =  append1_out(x2)
U31(x1, x2, x3, x4)  =  U31(x4)
U41(x1, x2, x3, x4, x5, x6)  =  U41(x2, x6)
PERM_IN(x1, x2)  =  PERM_IN(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

U31(append2_out(parts(V, .(H, U)))) → U41(H, append1_in(parts(V, U)))
PERM_IN(L) → U31(append2_in(is(sum(L))))
U41(H, append1_out(is(sum(W)))) → PERM_IN(W)

The TRS R consists of the following rules:

append2_in(is(sum(.(H, Z)))) → U1(H, append2_in(is(sum(Z))))
append2_in(is(sum(Y))) → append2_out(parts([], Y))
append1_in(parts(.(H, X), Y)) → U2(H, append1_in(parts(X, Y)))
append1_in(parts([], Y)) → append1_out(is(sum(Y)))
U1(H, append2_out(parts(X, Y))) → append2_out(parts(.(H, X), Y))
U2(H, append1_out(is(sum(Z)))) → append1_out(is(sum(.(H, Z))))

The set Q consists of the following terms:

append2_in(x0)
append1_in(x0)
U1(x0, x1)
U2(x0, x1)

We have to consider all (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

U31(append2_out(parts(V, .(H, U)))) → U41(H, append1_in(parts(V, U)))
PERM_IN(L) → U31(append2_in(is(sum(L))))


Used ordering: POLO with Polynomial interpretation [25]:

POL(.(x1, x2)) = 1 + x1 + x2   
POL(PERM_IN(x1)) = 1 + 2·x1   
POL(U1(x1, x2)) = 1 + x1 + x2   
POL(U2(x1, x2)) = 1 + x1 + x2   
POL(U31(x1)) = 2·x1   
POL(U41(x1, x2)) = 1 + x1 + 2·x2   
POL([]) = 0   
POL(append1_in(x1)) = x1   
POL(append1_out(x1)) = x1   
POL(append2_in(x1)) = x1   
POL(append2_out(x1)) = x1   
POL(is(x1)) = x1   
POL(parts(x1, x2)) = x1 + x2   
POL(sum(x1)) = x1   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ RuleRemovalProof
QDP
                            ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

U41(H, append1_out(is(sum(W)))) → PERM_IN(W)

The TRS R consists of the following rules:

append2_in(is(sum(.(H, Z)))) → U1(H, append2_in(is(sum(Z))))
append2_in(is(sum(Y))) → append2_out(parts([], Y))
append1_in(parts(.(H, X), Y)) → U2(H, append1_in(parts(X, Y)))
append1_in(parts([], Y)) → append1_out(is(sum(Y)))
U1(H, append2_out(parts(X, Y))) → append2_out(parts(.(H, X), Y))
U2(H, append1_out(is(sum(Z)))) → append1_out(is(sum(.(H, Z))))

The set Q consists of the following terms:

append2_in(x0)
append1_in(x0)
U1(x0, x1)
U2(x0, x1)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 1 less node.